import 'package:flutter/material.dart';
import 'package:time_manager/utils/RecordModel.dart';
import 'package:time_manager/utils/timeDeal.dart';

class LeftItem extends StatelessWidget {
  final RecoreModel item;
  const LeftItem({Key? key, required this.item}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Expanded(
        flex: 1,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          // mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('内容：${item.title}'),
            const SizedBox(
              height: 6,
            ),
            Text('时长：${item.duration}小时'),
            const SizedBox(
              height: 6,
            ),
            Text(
                '日期：${TimeUtil().getLocalTime(item.dealtime, format: "hours")}')
          ],
        ));
  }
}
